package com.unionfetch.content_home.bean

import android.content.Context
import androidx.annotation.StringRes
import com.unionftech.common.R.string
import com.unionftech.common.common.language.DynamicResourceManager

/**
 * 账户类型
 */
enum class AccountType(val accountType: Int, @StringRes val stringId: Int) {
    STP(2, string.standard),
    ECN(1, string.remarkable)
}

fun Int.getNameByType(context: Context): String {
    for (accountType in AccountType.entries) {
        if (accountType.accountType == this) {
            return DynamicResourceManager.getString(context, accountType.stringId)
        }
    }
    return ""
}